<%-- 
    Document   : contato
    Created on : 12/11/2014, 20:11:37
    Author     : Administrador
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="top.html" %>
    <div id="titulo" align="center">
        <h2>Fale Conosco</h2>
    </div>
    <div id="legenda">
        Contato
    </div>
    <br>
    <table align="center" width="500px" border="1px">
        <tr>            
            <td>
                <form class="form-horizontal" name="contato" method="POST" action="">
                <fieldset>
                    <div id="conteudo" style="margin-top:15px; margin-bottom:15px; margin-left:15px; margin-right:15px;">
                        <legend>Contato</legend>
                        <div class="form-group">
                            <label class="col-md-4 control-label" for="unidade">Unidade</label>
                            <div class="col-md-4">
                              <select id="unidade" name="unidade" class="form-control">
                                <option value="santos">Santos</option>
                                <option value="santos">Ilhabela</option>
                              </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-4 control-label" for="nome">Nome:</label>  
                            <div class="col-md-7">
                                <input id="nome" name="nome" type="text" placeholder="" class="form-control input-md">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-4 control-label" for="email">Email:</label>  
                            <div class="col-md-5">
                                <input id="email" name="email" type="text" placeholder="" class="form-control input-md">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-4 control-label" for="telefone">Telefone:</label>  
                            <div class="col-md-4">
                                <input id="telefone" name="telefone" type="text" placeholder="" class="form-control input-md">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-4 control-label" for="mensagem">Mensagem:</label>
                            <div class="col-md-7">                
                                <textarea class="form-control" id="msg" name="msg" rows="3"></textarea>
                            </div>
                        </div>
                        <input type="hidden" name="req" value="contato">
                        <div align='center'>
                            <input type="button" value="Enviar" class="btn btn-success" onclick="valida();">
                        </div>
                    </div>
                </fieldset>
                </form>
            </td>
        </tr>
    </table>
<br>

<%@include file="footer.html" %>
    <script type="text/javascript">
            function valida(){
                var d = document.cadastro;
                if(d.nome.value === "" || d.email.value === "" || d.telefone.value === "" || d.mensagem.value === ""){
                    alert("É necessário o preenchimento de todos os campos.");
                } else {
                    d.submit();
                }
            }
    </script>